<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>局部组件</title>
</head>
<body>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.31/vue.global.min.js"></script>
    <div id="app">
        <hdms />
    </div>
    <script>
        const hd = {
            data(){
                return{
                    title:"局部组件"
                }
            },
            template:`<p>{{title}}</p>`
        };
        const app = Vue.createApp({
            components:{hdms:hd}
        });
        app.mount("#app");
    </script>
</body>
</html>